package fristphase.day9_14;

class Point {
    private int x,y;
    Point(int x, int y){
        this.x = x;
        this.y = y;
    }

    public String toString(){
        return "Point{"+"x="+x+"y="+y+"}";
    }

    public boolean equals(Object obj){
        if(this == obj)return true;
        if(obj == null || getClass() != obj.getClass())return false;
        Point point = (Point) obj;
        return  x == point.x && y == point.y;
    }

    public void setX(int x){
        this.x = x;
    }

    public int getY(){
        return y;
    }
}
